import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    username:'',
    email:'',
    password:'',
    isLogin:false,
  },
  mutations: {
    login(state,username,email,password){
      state.isLogin=true;
      state.username = username;
      state.password=password;
      state.email=email;
    },
    logout(state){
      state.isLogin=false;
      state.username='';
      state.password='';
      state.email='';
    }
  },
  actions: {
  },
  modules: {
  }
})
